<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>个人成绩</title>
    <link href="dist/css/bootstrap.css" rel="stylesheet">
    <link href="css/docs.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/highlight.js/7.3/styles/github.min.css" rel="stylesheet">
    <style>
        body
        {
            font-family: "ff-tisa-web-pro-1" , "ff-tisa-web-pro-2" , "Lucida Grande" , "Helvetica Neue" ,Helvetica,Arial, "Hiragino Sans GB" , "Hiragino Sans GB W3" , "WenQuanYi Micro Hei" ,sans-serif;
        }
        h1, .h1, h2, .h2, h3, .h3, h4, .h4, .lead
        {
            font-family: "ff-tisa-web-pro-1" , "ff-tisa-web-pro-2" , "Lucida Grande" , "Helvetica Neue" ,Helvetica,Arial, "Hiragino Sans GB" , "Hiragino Sans GB W3" , "Microsoft YaHei UI" , "Microsoft YaHei" , "WenQuanYi Micro Hei" ,sans-serif;
        }
        pre code
        {
            background: transparent;
        }
        @media (min-width: 900px)
        {
            .bs-docs-home .bs-social, .bs-docs-home .bs-masthead-links
            {
                margin-left: 0;
            }
        }
        .bs-docs-section p
        {
            line-height: 2;
        }
        .bs-docs-section p.lead
        {
            line-height: 1.4;
        }
    </style>
    <!--[if lt IE 9]><script src="../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
  <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
  <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
    <script src="js/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script language="javascript">
        var tip = "请输入姓名、单位或比赛项目";
        $(document).ready(function () {
            initText();
            $("#btnSearch").click(function () {

                $("#tblResult").hide();
                $("#loading").show();
                $("#tblResult > tbody").empty();

                var txtval = $("#txtVal").val();
                if (txtval == tip) {
                    txtval = "";
                }

                $.ajax({ url: "ashx/saishi_1.ashx",
                    cache: false,
                    dataType: "json",
                    type: "post",
                    data: { "text": txtval },
                    success: function (data) {
                        $("#loading").hide();
                        $("#tblResult").show();

                        if (data.length == 0) {
                            alert("没有找到符合条件的数据！");
                            return;
                        }

                        var result = new Array();
                        for (i = 0; i < data.length; i++) {
                            result.push("<tr><td>" + (i + 1).toString() + "</td>");
                            result.push("<td>" + data[i].name + "</td>");
                            result.push("<td>" + data[i].company + "</td>");
                            result.push("<td>" + data[i].itemname + "</td>");
                            result.push("<td>" + data[i].score + "</td>");
                            result.push("<td>" + data[i].sort + "</td></tr>");
                        }

                        $("#tblResult > tbody").html(result.join(''));
                    }
                });

            });
        });

        function initText() {//搜索框初始化
            $("#txtVal").val(tip);
            $("#txtVal").css("color", "#ccc");
            $("#txtVal").blur(function () {
                if ($("#txtVal").val() == "") {
                    $("#txtVal").val(tip);
                    $("#txtVal").css("color", "#ccc");
                }
            });

            $("#txtVal").focus(function () {
                if ($("#txtVal").val() == tip) {
                    $("#txtVal").val("");
                    $("#txtVal").css("color", "#000");
                }
            });
        }
    </script>
</head>
<body>
    <a class="sr-only" href="#content">Skip to main content</a>
    <!-- Docs master nav -->
    <header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav" role="banner">
  <div class="container">
    <div class="navbar-header">
      <button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="../" class="navbar-brand">第六届运动会</a>
    </div>
    <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
      <ul class="nav navbar-nav">
        <li>
          <a href="index.html">首页</a>
        </li>

      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
          <a href="about.html">关于</a>
        </li>
      </ul>
    </nav>
  </div>
</header>
    <div class="container">
        <div class="starter-template">
            <!--=======================================================-->
            <h1 id="overview">
                个人成绩</h1>
            <!---成绩查询组件，便于管理员快速查询并修改-->
            <div class="row">
                <div class="col-xs-3">
                    <input type="text" class="form-control" id="txtVal" />
                </div>
                <button type="button" class="btn btn-success" id="btnSearch">
                    查询</button>
            </div>
            <!--/row-->
            <br>
            <!--/报名查询组件-->
            <div class="panel panel-default">
                <!--<div class="panel-heading">报名信息查询和修改</div>-->
                <!-- Table -->
                <div id="loading">
                    <img src="images/loading.gif" />
                </div>
                <table id="tblResult" class="table table-bordered">
                    <thead>
                        <tr>
                            <th>
                                序号
                            </th>
                            <th>
                                姓名
                            </th>
                            <th>
                                单位
                            </th>
                            <th>
                                比赛项目
                            </th>
                            <th>
                                成绩
                            </th>
                            <th>
                                名次
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
                <!--/table-->
            </div>
            <!--/panel-->
        </div>
    </div>
    <!-- /.container -->
    <!-- Footer
================================================== -->
    <footer class="bs-footer" role="contentinfo">
      <div class="container">
        <p>© 2012 <a href="http://www.cnmtp.com">www.cnmtp.com</a> - 厦门迈科诺信息技术有限公司</p>
      </div>
</footer>
    <script src="js/bootstrap.js"></script>
    <script src="docs-assets/js/application.js"></script>
</body>
</html>
